Readable, reusable, and composable prompts

Compose prompts like software. Read them like Markdown.

WeaveMark is a small, Markdown-native specification language for prompts: you specify abstract intent and the LLM-based processor makes it concrete (either by compilation or dynamic interpretation). The readable, reusable units you write in it are called promplets: each can stand alone or be built from other promplets. Great for both humans and AI agents.

 pip install weavemark
 weavemark library market-snapshot --replay --verbose --open

Restores the saved market run and opens its final HTML dashboard. How replay works

image chain author once, render every page
finished media twelve illustrated pages plus HTML and PDF
reusable core one story module powers comic and book
90 reusable method fragments — MECE, ACH, SCAMPER, chain-of-thought, and more
9 execution engines — tree-of-thought, self-consistency, reflection, functional, FSLM
1 → many one source compiles to prompts, packs, agent specs, or a running app
LLM-compiled abstract intent becomes concrete — LLM-based where meaning matters, structural where it helps
Highly experimental. WeaveMark’s notation, Processor, examples, and public interfaces are still evolving — expect rough edges, surprising results, and breaking changes.

What it gives you

Keep intent readable, reusable, and reviewable.

A promplet is readable Markdown before compilation and a concrete artifact afterward. Shared guidance stays in modules instead of spreading through copied prompts.

Author

Write for people first.

Keep important prompts in minimally intrusive Markdown files. Review changes and evolve behavior without burying the prose.

Compose

Import meaning, not copies.

Refine shared methods and constraints, then branch with @if or @match for controlled variations.

Deliver

Inspect what you ship.

Review the compiled result and its contract, then use it as a prompt, specification, emitted file, or executable workflow.

Semantic composition

Import obligations, not copied prose.

A model decides how reusable guidance belongs in the local document; deterministic structure keeps variables, branches, and contracts explicit.

Worked example

Reusable structure plus local intent.

The source stays compact, while the compiled prompt gains the reusable decision structure in the right places.

Reusable structure Local intent Final compiled prompt
1. Reusable module
# Decision brief refinement

Lead with the decision pressure.
Separate facts, assumptions, and judgment.
Include counter-evidence and reversal triggers.

@output enforce: strict
  Return decision, evidence, and next action.
2. Local promplet
@refine module:weavemark.std.lenses.decision_gate mingle: true

# Launch gate

Ship @{release} to
@{segment} this week?
Use @{validation_log} and @{open_risks}.

@if executive_audience
  Compress into board-ready language.
3. Compiled result
# Launch gate

Ship Aurora 1.0 to beta teams this week?

Lead with the decision pressure: ship,
wait, or narrow the rollout.

Use the validation log and open risks. Separate
facts, assumptions, and judgment.

Include counter-evidence and reversal triggers.
Give the smallest safe next action in board-ready language.

Language moves

Directives stay small and local.

Each directive does one visible job while the source continues to read as a document.

@refine Weave reusable guidance into local intent.
@refine module:weavemark.std.analysis.mece_core
@if Keep controlled variations in one source.
@if executive_audience
  Compress into board-ready language.
@ask Pause for human context before compiling.
@ask clarifying question detail_level: 35%
  Teach @{topic} to this learner.
@iterate Judge and improve a transformation.
@iterate 3
  @expand mode: intention
    Draft the onboarding prompt.
@assert Make output obligations explicit.
@assert contains: "open questions"
@execute Choose how the compiled prompt runs.
@execute reflection
  max_rounds: 3

Batteries included

A library of reusable methods, not just syntax.

Ninety reusable fragments ship with WeaveMark. Refine one into your source and its method comes with it.

“I have to make a hard call and I keep going in circles.”

“I want an app built, but my spec is three vague sentences.”

“The answer sounds confident. Should I believe it?”

“I need ideas that aren't the first three obvious ones.”

“I have to teach this, and they keep getting it wrong.”

“This pile of notes has to become something readable.”

Outcomes

From source file to useful artifact.

Compile a prompt, prepare a software specification, or run a tool-grounded workflow.

Start here

Choose the shortest path for your next step.

Start with one promplet, then use the tutorial, API, or reference only when you need more.

Start

Build your first promplet

Create a promplet from a blank page: add variables, borrow reusable constraints, branch, and lock the output shape.

Build your first promplet

80-second walkthrough

See WeaveMark in motion.

Take a quick tour from readable promplet source to compilation, execution, and finished artifacts.

YouTube loads only after you press play. If the embedded player is blocked, watch the full-resolution video on YouTube.

Live results

Play what a promplet produced.

Open a result, then inspect the source, compiled artifact, or trace that produced it.

Illustrated storybook

Orion and the Hunt for His Spark

A twelve-page picture book authored, illustrated page by page, and packaged to HTML/PDF by one executable promplet.

Spec becomes software

AI Kanban

A concise browser-app promplet became a complete static JavaScript workspace backed by a user-selected SQLite file.

Tool-grounded report

VALE3 Market Learning Dashboard

Finance data and bounded web-search evidence flow through a validated graph into an auditable report and standalone dashboard.

Reflection game

Arcana

A 55-card archetypal reflection game generated in two stages: deck artifacts, then a private browser reading experience.

More generated applications Knowledge Cards